package com.proposition.support.exception;

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * 异常捕获
 * @author Administrator
 *
 */
@ControllerAdvice
public class ExceptionAdvice {
	/**
	 * 若是用户没登录将会跳转至登录界面
	 * @return
	 */
	@ExceptionHandler(value=LogOutException.class)
	public String logOutException(){
		return "login";
	}


	@ExceptionHandler(value=AuthorizationException.class)
	public String authorizationException(){
		return "401";
	}
}
